package com.example.entity;


import com.example.utils.JSON;

public class Ingredient{


    /**
     * materialId : 1
     * name : 鸭子
     * origin : 鸡舍
     */

    private int materialId;
    private String name;
    private String origin;

    public int getMaterialId() {
        return materialId;
    }

    public void setMaterialId(int materialId) {
        this.materialId = materialId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getOrigin() {
        return origin;
    }

    public void setOrigin(String origin) {
        this.origin = origin;
    }


    @Override
    public String toString() {
                try {
            return JSON.getObjectMapper().writeValueAsString(this);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return "";
    }
}
